<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('新增酒店')" />
</head>
<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m" id="form-hotel-add">
			<div class="col-md-12">
				<div class="form-group">
					<label class="col-sm-3 control-label">酒店名称：</label>
					<div class="col-sm-9">
						<input type="text" name="name" class="form-control" placeholder="请输入酒店名称" required>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">联系电话：</label>
					<div class="col-sm-9">
						<input type="text" name="telephone" class="form-control" placeholder="请输入联系电话" required>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">酒店地址：</label>
					<div class="col-sm-9">
						<input type="text" name="address" class="form-control" placeholder="请输入酒店地址" required>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">酒店简介：</label>
					<div class="col-sm-9">
						<textarea type="text" name="description" class="form-control" placeholder="请输入酒店简介"></textarea>
					</div>
				</div>
			</div>
		</form>
	</div>
	<th:block th:include="include :: footer" />
	<script type="text/javascript">
		var prefix = ctx + "hotel";
		
		$("#form-user-add").validate({
			onkeyup: false,
			rules:{
				// userPhone:{
				// 	isPhone:true
				// },
				// userEmail:{
				// 	email:true
				// },
			},
		    focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	        	$.operate.save(prefix + "/add", $('#form-hotel-add').serialize());
	        }
	    }
	</script>
</body>
</html>
